﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

    public partial class LoginSite : System.Web.UI.MasterPage
    {
        public void CheckSession()
        {
            //if (Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd", Global.oCulture)) > Global.KeyDate)
            //{
            //    Response.Redirect("../../web/main/wfrmLogoff.aspx");
            //}


            if (Session["USER_USERID"] == null || Session["USER_TYPE"] == null || Session["SHOP_ID"] == null)
            {
                Response.Redirect("../main/Logoff.aspx");
                //if (Request.Cookies["Poximo"] != null && Request.Cookies["Poximo"]["USER_USERID"] != null)
                //{
                //    Session["USER_USERID"] = Request.Cookies["Poximo"]["USER_USERID"];
                //    Session["USER_FULLNAME"] = Request.Cookies["Poximo"]["USER_FULLNAME"];
                //    Session["USER_TYPE"] = Request.Cookies["Poximo"]["USER_TYPE"];
                //    Session["SHOP_ID"] = Request.Cookies["Poximo"]["SHOP_ID"];
                //}
                //else
                //{
                //    Response.Redirect("../../main/Logoff.aspx");
                //}
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            CheckSession();

            //lblVersion.Text = System.Configuration.ConfigurationManager.AppSettings["ApplicationVersion"].ToString();
            lblUserID.Text = Session["USER_USERID"].ToString();
            lblFullName.Text = Session["USER_FULLNAME"].ToString();

            if (!IsPostBack)
            {
            
            }
        }
    }
